﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AdventureWorksWebApp
{
    public partial class index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            using (DataClasses1DataContext dc = new DataClasses1DataContext())
            {
                var liczbaProduktow = (from x in dc.Products
                         select x).Count();
                Label1.Text = "Liczba produktów w bazie: " + liczbaProduktow.ToString();
            }
        }
    }
}